package com.green.ioc.config;

import com.green.ioc.entity.SttCar;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class BeanConfig {

    //默认的beanName是方法名
    @Bean
    public SttCar myCar(){
        SttCar sttCar = new SttCar();
        sttCar.setId(1L);
        sttCar.setName("仰望U8");
        sttCar.setBrand("byd");
        return sttCar;
    }
}
